let nav=['index','course','statuscourse','socketteacher','ai']
var dataform={}
async function hideH5(navList,classname){
   
    for (const i of navList){
        $(`.${i}`).hide()
    }

    $(`.${classname}`).show()
}
$('#index').click(async ()=>{
    $('#chata').remove();
    await hideH5(navList=nav,classname='index')
   
})
$('#course').click(async ()=>{
    $('#chata').remove();
    await hideH5(navList=nav,classname='course')
})
$('#statuscourse').click(async ()=>{
    $('#chata').remove();
    await hideH5(navList=nav,classname='statuscourse')
})
//socketteacher
$('#socketteacher').click(async ()=>{
    $('#chata').remove();
    await loadCSS()
    await hideH5(navList=nav,classname='socketteacher')
})
$('#ai').click(async ()=>{
    $('#chata').remove();
    await loadCSS()
    await hideH5(navList=nav,classname='ai')
})
async function loadCSS() {
    let url='../static/css/chat.css'
    var link = document.createElement("link");
    link.href = url;
    link.rel = "stylesheet";
    link.id='chata'
    document.head.appendChild(link);
}